home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
rbbs_pc
/
173amrg.zip
/
RSB2173A.MRG
< prev
next >
Wrap
Text File
|
1990-08-26
|
32KB
|
799 lines
* ------------[ BLED merge (c) Ken Goosens ]-------------
* Merge this against D:\172B\RBBSSUB2.BAS to produce RBBSSUB2.BAS
* D:\172B\RBBSSUB2.BAS: Date 2-10-1990 Size 134325 bytes
* ------------[ Created 08-26-1990 11:28:48 ]------------
* REPLACING old line(s) by new
' $linesize:132
* ------[ first line different ]------
' $title: 'RBBSSUB2.BAS 17.3A, Copyright 1986 - 90 by D. Thomas Mack' ' DA081003
' Copyright 1990 by D. Thomas Mack, all rights reserved.
' Name ...............: RBBSSUB2.BAS
' First Released .....: February 11, 1990
' Subsequent Releases.: August 26, 1990
' Copyright ..........: 1986 - 1990
' Purpose.............: The Remote Bulletin Board System for the IBM PC,
' RBBS-PC.BAS utilizes a lot of common subroutines. Those that do not
' require error trapping are incorporated within RBBSSUB 2-5 as
' separately callable subroutines in order to free up as much
' code as possible within the 64WasK code segment used by RBBS-PC.BAS.
' Parameters..........: Most parameters are passed via a COMMON statement.
'
' Subroutine Line Function of Subroutine
' Name Number
' Macro 1320 Check/execute macro
' AnswerIt 200 Answer the telephone when it rings
' ASCIICodes 129 Allow a CONFIG string to have any ASCII value
' BadChar 455 Check user name for invalid characters
' BadName 20235 Check for system crash attempt with bad file name
' Baud450 5507 Allow 300 baud callers to bump up to 450 baud
' CheckRatio 20096 Test upload/download ratio
' CheckMacro 1242 Checks for macro and processes
' CopyRight 97 Display RBBS-PC's copyright notice
' DEFALTU 9600 Write out the user's defaults
' DenyAccess 1386 Downgrade security so access denied
' DoorExit 10983 Set up a .BAT file to exit RBBS-PC to a "door"
' DosExit 10934 Set up a .BAT file to exit to DOS (second level)
' EditALine 2618 Edits a single line
' EditDef 120 Edit configuration parameters
' FileNameCheck 20240 Matches file name to a prefix & extension
' GetArc 20140 Handle request for verbose listing
' GetCommand 101 Get RBBS-PC's node id from command line
' GetTime 9140 Calculates callers elapsed time (hh,mm,ss)
' GoIdle 90 Release resources when waiting for keyboard input
' KillMsg 3952 Delete old or unnecessary messages
' Line25 945 Build and/or update line 25 of RBBS-PC's local screen
' LineEdit 3700 Edit a line while minimizing string space consumption
' LogError 13660 Log error message to CALLERS file
' LPrnt 1480 Subroutine to write to local display
' MLInit 8 Handle MultiLink initialization/de-initialization
' MsgProt 2055 Sets protection for a message
' MessageTo 2018 Sets who a message is to
' PageLen 5200 Change page length
' ParseIt 1637 Parses a string
' PassWrd 660 Verify user & message passwords
' PopCmdStack 1650 Get user input, 1st checking command stack
' PScrn 1483 Print to display
' QuickLPrnt 1482 Quickly writes count of blocks on file transfer
' QuickTPut 1478 Fast, but limited, "TPut" equivalent
' QuickTPut1 1478 Outputs short string following by CR LF
' RBBSExit 10992 RBBS-PC exit to transfer control to other programs
' RecoverMsg 10410 Recover a deleted message
' RemNonAlf 5100 Removes non-alpha characters from a string
' RingCaller 1636 Ring caller's bell and put message in emphasis
' SetBaud 1654 Set baud rate in the 8250 chip of the RS232 interface
' SetCrLf 1496 Set up the necessary carriage return/line feed string
' SetSection 12000 Set the proper section prompts (main, file, util, libr)
' SetThread 4554 Set up request for threading thru messages
' SkipLine 1485 Write a # of blank lines to the communications port
' SearchCmd 1238 Searches list of commands in RBBS for a request
' SecViolation 1380 Process a security violation
' SysMenu 112 Displays sysop menu/status
' SysopChat 4773 Sysop and caller chat
' TestRel 336 Tests for Reliable connect
' TGet 1498 Read a line from the communications port
' TPut 1396 Write a line to the communications port
' Trim 105 Strip leading and trailing blanks from a string
' TrimTrail 107 Strip off specified string off end of another string
' UntilRight 12878 Ask a question until user says answer is right
' UpdateU 10600 Updates the user record on loging off/exiting RBBS-PC
' VarInit 109 Initialize system variables
' ViewHelp 1330 Processes help command
' WhoCheck 2250 Checks whether a user exists in user file
' WhosOn 9801 Report status of each node - who's on
' WordInFile 10976 Find a whole word within a file/menu
'
' $INCLUDE: 'RBBS-VAR.BAS'
'
* REPLACING old line(s) by new
97 ' $SUBTITLE: 'CopyRight - subroutine to display RBBS-PC copyright'
' $PAGE
'
' NAME -- CopyRight
'
' INPUTS -- NONE
'
' OUTPUTS -- NONE
'
' PURPOSE -- To display RBBS-PC's copyright notice on the local screen
'
SUB CopyRight STATIC
ZWasA = (ZRecycleToDos OR ZDebug OR ZNodeRecIndex > 2)
IF ZWasA THEN _
EXIT SUB
WIDTH 80
REDIM ZOutTxt$(11)
* ------[ first line different ]------
ZOutTxt$(1) = "If you use RBBS-PC 17.3A, please consider contributing to" ' DA081003
ZOutTxt$(2) = ""
ZOutTxt$(3) = " Capital PC Software Exchange"
ZOutTxt$(4) = " Post Office Box 6128"
ZOutTxt$(5) = " Silver Spring, Maryland 20906"
ZOutTxt$(6) = ""
ZOutTxt$(7) = "You are free to copy/share RBBS-PC 17.3A provided" ' DA081003
ZOutTxt$(08)= " 1. This program is distributed unmodified"
ZOutTxt$(09)= " 2. No fee or consideration is charged for RBBS-PC itself"
ZOutTxt$(10)= " 3. This notice is not bypassed or removed."
CLS
KEY OFF
LOCATE ,,0
ZSnoop = -1
ZLocalUser = -1
CALL LPrnt(SPACE$(60) + "tm",1)
CALL LPrnt(SPACE$(16) + STRING$(15,205) + " U S E R W A R E " + STRING$(15,205),1)
CALL SkipLine(1)
CALL LPrnt(SPACE$(17) + "Capital PC User Group User-Supported Software",1)
CALL SkipLine (1)
CALL LPrnt(SPACE$(5) + CHR$(214) + STRING$(66,196) + CHR$(183),1)
FOR WasI = 1 TO 10
CALL LPrnt(SPACE$(5) + CHR$(186) + " " + ZOutTxt$(WasI) + SPACE$(62 - LEN(ZOutTxt$(WasI))) + CHR$(186),1)
NEXT
CALL LPrnt(SPACE$(5) + CHR$(211) + STRING$(66,196) + CHR$(189),1)
CALL LPrnt(SPACE$(5) + "Copyright (c) 1983-90 Tom Mack, 39 Cranbury Drive, Trumbull, CT 06611",1)
CALL DelayTime (8)
ZSnoop = 0
END SUB
* REPLACING old line(s) by new
336 ' $SUBTITLE: 'TestRel - Test for Reliable mode connection'
' $PAGE
'
' NAME -- TestRel
'
' INPUTS -- PARAMETER MEANING
' Strng$ String to check for reliable
'
' OUTPUTS -- ZReliableMode Reliable mode indicator
'
' PURPOSE -- To test for reliable connect
'
SUB TestRel (Strng$) STATIC
ZReliableMode = ZFalse
IF Strng$ = "" THEN _
EXIT SUB
IF INSTR(Strng$,"REL") OR _
* ------[ first line different ]------
INSTR(Strng$,"R C") OR _ ' DA071701
INSTR(Strng$,"ARQ") OR _
INSTR(Strng$,"LAP") OR _
INSTR(Strng$,"AFT") OR _
INSTR(Strng$,"MNP") THEN _
ZReliableMode = -1
END SUB
* REPLACING old line(s) by new
949 ZLine25$ = "Node " + _
ZNodeID$ + " " + _
ZPageStatus$ + " " + _
* ------[ first line different ]------
MID$("AVL ",1, -4 * ZSysopAvail) + _ ' DA080902
MID$("ANY ",1, -4 * ZSysopAnnoy) + _ ' DA080902
MID$("LPT ",1, -4 * ZPrinter) + _ ' DA080902
MID$("SYS ",1, -4 * ZSysopNext) + _ ' DA080902
MID$("XOFF ",1,-5 * ZXOffEd) + _ ' DA080902
MID$("CTS ",1,-4 * ZNotCTS) ' DA080902
'
'
' * LINE 25 UPDATE ROUTINE
'
'
* REPLACING old line(s) by new
950 IF NOT ZSnoop THEN _
EXIT SUB
ZCursorLine = CSRLIN
ZCursorRow = POS(0)
ZWasHH = LEN(ZActiveUserName$) + _
LEN(ZWasCI$) + _
LEN(ZLine25$) + _
* ------[ first line different ]------
LEN(STR$(ZUserSecLevel)) ' DA080902
LOCATE 25,1
IF ZNetworkType = 0 THEN _
IF ZAutoDownYes THEN _
ZLockStatus$ = " AD " + _ ' DA080902
ZTimeLoggedOn$ _
ELSE ZLockStatus$ = SPACE$(4) + _ ' DA080902
ZTimeLoggedOn$
IF ZWasHH > 63 THEN _ ' DA080902
ZWasHH = 0 _ ' DA080902
ELSE _ ' DA080902
ZWasHH = 64 - ZWasHH ' DA080902
ZLine25Hold$ = ZLine25$ + _
SPACE$(ZWasHH) + _ ' DA080902
STR$(ZUserSecLevel) + _
" " + _
ZActiveUserName$ + _
" " + _
ZWasCI$ ' DA080902
ZLine25Hold$ = LEFT$(ZLine25Hold$, 66) + " " + ZLockStatus$ ' DA080902
TempBasicWrites = ZUseBASICWrites
ZUseBASICWrites = ZTrue
CALL LPrnt(ZLine25Hold$,0)
ZUseBASICWrites = TempBasicWrites
LOCATE ZCursorLine,ZCursorRow
END SUB
* REPLACING old line(s) by new
1325 ' $SUBTITLE: 'Macro - check if macro exists & process'
' $PAGE
'
' NAME -- Macro
'
' INPUTS -- PARAMETER MEANING
' Strng$ STRING TO CHECK IF IS A MACRO
' ZMacroDrvPath$ DRIVE/PATH WHERE MACROS ARE
' ZMacroExtension$ EXTENSION OF MACROS
' MACRO.OFF FORCE NO MACRO TO BE Found
'
' OUTPUTS -- MacroFound WHETHER A MACRO WAS Found
' Strng$ SUBSTITUTE FOR COMMANDS
' ZCommPortStack$ REST OF MACRO
' 0 IF NOT Found
'
' PURPOSE -- Executes a macro if found. Does not check if macro
' letter uses a command.
SUB Macro (Strng$,MacroFound) STATIC
MacroFound = ZFalse
* ------[ first line different ]------
FilName$ = Strng$ ' KG071201
CALL BreakFileName (FilName$,ZWasDF$,Prefix$,WasX$,ZFalse) ' KG071201
IF WasX$ = "" THEN _ ' KG071201
FilName$ = Strng$ + ZMacroExtension$ ' KG071201
IF ZWasDF$ = "" THEN _ ' KG071201
FilName$ = ZMacroDrvPath$ + FilName$ ' KG071201
CALL BadFile (FilName$,ZWasA)
IF ZWasA > 1 THEN _
EXIT SUB
CALL GRAPHICX (ZUserGraphicDefault$,FilName$,6)
IF NOT ZOK THEN _
EXIT SUB
CALL ReadDir (6,1)
IF ZErrCode > 0 THEN _
EXIT SUB
CALL CheckInt (ZOutTxt$)
IF ZErrCode > 0 OR ZUserSecLevel < ZTestedIntValue THEN _
EXIT SUB
ZWasA = INSTR(ZOutTxt$,"/")
IF ZWasA > 0 THEN _ ' Check macro contraint
WasX$ = RIGHT$(ZOutTxt$,LEN(ZOutTxt$)-ZWasA) : _
IF RIGHT$(WasX$,1) = "/" THEN _
IF ZLastCommand$ <> LEFT$(WasX$,LEN(WasX$)-1) THEN _
EXIT SUB _
ELSE GOTO 1327 _
ELSE IF LEFT$(ZLastCommand$,LEN(WasX$)) <> WasX$ THEN _
EXIT SUB
* REPLACING old line(s) by new
1331 IF SotMenu THEN _
ZFileName$ = HelpMenu$ : _
GOSUB 1350 : _
SotMenu = ZFalse
ZAnsIndex = 1
* ------[ first line different ]------
ZOutTxt$ = "Help with what Command (or Topic name)" + _ ' DA071701
ZPressEnterExpert$
ZSubParm = 1
CALL TGet
IF ZSubParm = -1 THEN _
EXIT SUB
IF ZWasQ = 0 THEN _
EXIT SUB
ZLastIndex = ZWasQ
* REPLACING old line(s) by new
1537 CALL CheckTime(ZAutoLogoff!, TempElapsed!, 3)
IF TempElapsed! < 30 THEN _
IF TempElapsed! <= 0 THEN _
CALL UpdtCalr ("Sleep disconnect",1) : _
ZSubParm = -1 : _
ZNo = ZTrue : _
ZSleepDisconnect = ZTrue : _
EXIT SUB _
ELSE IF SleepWarn THEN _
SleepWarn = ZFalse : _
* ------[ first line different ]------
ZOutTxt$ = "Auto-Logoff in 30 seconds..." : _ ' DA071701
CALL RingCaller
CALL FindFKey
IF ZSubParm < 0 THEN _
EXIT SUB
* REPLACING old line(s) by new
1550 IF ZLogonActive THEN _
* ------[ first line different ]------
IF (ZWasY$ = " " OR ZWasY$ = ";") AND LEN(ZUserIn$) > 0 AND _ ' MB073001
RIGHT$(ZUserIn$,1) <> " " AND RIGHT$(ZUserIn$,1) <> ";" THEN _
Parm = Parm + 1 : _
ZLogonActive = (Parm < 3) : _
ZHidden = (Parm = 2) : _
CALL LPrnt(WasX$,0) : _
GOTO 1551
IF ZHidden AND (WasX$ <> " ") THEN _
WasX$ = "."
CALL LPrnt(WasX$,0)
* REPLACING old line(s) by new
1628 CALL VerifyAns
IF NOT ZOK THEN _
CALL QuickTPut1 ("Invalid answer <" + ZUserIn$(1) + ">") : _
GOTO 1500
HoldA$ = ""
ZForceKeyboard = ZFalse
IF ZMacroSave > 0 THEN _
ZGSRAra$(ZMacroSave) = ZUserIn$ : _
ZMacroSave = 0 : _
GOTO 1632
IF (ZDistantTGet > 0) OR (ZMacroTemplate$ <> "") THEN _
CALL WipeLine (38) : _
IF NOT ZNo THEN _
GOTO 1632 _
ELSE ZWasQ = 0 : _
ZMacroTemplate$ = "" : _
ZDistantTGet = 0 : _
ZNo = ZFalse : _
GOTO 1633
IF ZMacroActive THEN _
ZLastIndex = ZWasQ : _
FirstIndex = 1: _
* ------[ first line different ]------
ZMacroActive = NOT EOF(6) : _ ' KG021501
EXIT SUB
IF ZAnsIndex > 255 OR ((NOT InStack) AND INSTR(ZUserIn$,".") > 0) THEN _
EXIT SUB
IF MacroIndex THEN _
MacroIndex = 1 _
ELSE MacroIndex = ZAnsIndex
CALL NoPath (ZUserIn$(MacroIndex),Found)
IF Found THEN _
EXIT SUB
CALL CheckMacro (ZUserIn$(MacroIndex),Found)
IF Found THEN _
ZStoreParseAt = ZAnsIndex : _
GOTO 1525
EXIT SUB
* REPLACING old line(s) by new
1651 IF ZAnsIndex < ZLastIndex THEN _
ZAnsIndex = ZAnsIndex + 1 : _
ZUserIn$ = ZUserIn$(ZAnsIndex) : _
* ------[ first line different ]------
IF MID$(ZLastCommand$,2,1) <> " " AND (NOT ZStackC) AND ZAnsIndex > 1 AND INSTR("Cc",ZUserIn$) > 0 AND LEN(ZUserIn$) = 1 THEN _ ' KG070901
GOTO 1651 _
ELSE ZSubParm = 3 : _
CALL TGet : _
GOTO 1652
ZLastIndex = 0
ZAnsIndex = 1
ZSubParm = 1
ZSearchingAll = ZFalse
CALL TGet
ZLastIndex = ZWasQ
* REPLACING old line(s) by new
2032 IF MsgTo$ <> "ALL" THEN _
IF (LEFT$(MsgTo$,4) <> "ALL " AND ZStartHash = 1) THEN _
* ------[ first line different ]------
ZWasDF = INSTR(MsgTo$+" @"," @") : _ ' KG052201
TempHashValue$ = LEFT$(MsgTo$,ZWasDF-1) : _ ' KG052201
CALL WhoCheck (TempHashValue$,Found,RcvrRecNum) : _
IF NOT Found THEN _
ZLastIndex = 0 : _
RcvrRecNum = 0 : _ ' KG060901
IF NOT ZReply THEN _
ZOutTxt$ = "[R]e-enter name, Q)uit, C)ontinue" : _
ZTurboKey = -ZTurboKeyUser : _
ZLastIndex = 0 : _
GOSUB 2033 : _
ZWasZ$ = ZUserIn$(1) : _
CALL AllCaps (ZWasZ$) : _
IF ZWasZ$ <> "C" THEN _
MsgTo$ = "" : _
IF ZWasZ$ <> "Q" THEN _
GOTO 2020
IF MsgTo$ = Temp$ THEN _
ZOutTxt$ = "Msg would be from and to SAME PERSON! Really do this (Y,[N])" : _
ZLastIndex = 0 : _
GOSUB 2033 : _
IF NOT ZYes THEN _
MsgTo$ = ""
EXIT SUB
* REPLACING old line(s) by new
2081 CALL QuickTPut1 ("Sending private mail to " + MsgTo$) ' DA071701
* REPLACING old line(s) by new
* ------[ first line different ]------
2088 ZOutTxt$ = "Receiver(s) MUST know password to read msg. Use password (Y/[N])" ' DA071701
GOSUB 2093
IF NOT ZYes THEN _
GOTO 2070
WasL = 14
WasA1$ = "!"
GOSUB 2085
CALL AllCaps (ZUserIn$)
GOTO 2092
'
' ** MAKE MESSAGE KILL PROTECTED (ONLY SENDER, ADDRESSEE AND SYSOP CAN KILL) *
'
* REPLACING old line(s) by new
* ------[ first line different ]------
2092 MsgPswd$ = WasA1$ + ZUserIn$ ' DA071701
EXIT SUB
* REPLACING old line(s) by new
2250 ' $SUBTITLE: 'WhoCheck - Checks whether user exists'
' $PAGE
'
' NAME -- WhoCheck
'
' INPUTS -- PARAMETER MEANING
' WhoFind$ User to find
'
' OUTPUTS -- WhoFound Whether user found
' UserNumFound Record # of user
'
' PURPOSE -- Validate that user record exists. Sysop
' counted as found even if lack user record.
'
SUB WhoCheck (WhoFind$,WhoFound,UserNumFound) STATIC
UserNumFound = 0
IF ZStartHash <> 1 THEN _
WhoFound = ZTrue : _
EXIT SUB
Work128$ = ZUserRecord$
WhoFound = ZFalse
ToSysop = (INSTR(WhoFind$,"SYSOP") > 0 OR _
* ------[ first line different ]------
INSTR(WhoFind$,ZSysopFirstName$ + " " + ZSysopLastName$) > 0) ' KG060902
CALL OpenUser (HighestUserRecord)
FIELD 5, 128 AS ZUserRecord$
IF ToSysop THEN _
WasX$ = ZSysopPswd1$ + " " + ZSysopPswd2$ _
ELSE WasX$ = WhoFind$
ZWasDF = INSTR(WasX$+"@","@") ' KG052201
WasX$ = LEFT$(WasX$,ZWasDF) ' KG052201
IF LEN(WasX$) > 1 THEN _
CALL FindUser (WasX$,"",ZStartHash,ZLenHash,_
0,0,HighestUserRecord,WhoFound,_
UserNumFound,ZWasSL)
LSET ZUserRecord$ = Work128$
IF NOT WhoFound THEN _
IF ToSysop THEN _
WhoFound = ZTrue _
ELSE CALL QuickTPut1 (WhoFind$ + " not active user")
END SUB
* REPLACING old line(s) by new
3700 ' $SUBTITLE: 'LineEdit - subroutine to produce edited line'
' $PAGE
'
' NAME -- LineEdit
'
' INPUTS -- PARAMETER MEANING
' ZBackArrow$
' ZBackSpace$
' ZCarriageReturn$
' ZLineFeed$
' ZLineMes$ BUFFER SPACE TO USE FOR HOLDING LINE
' ZLocalUser
' MaxLen MAXIMUM LENGTH OF STRING TO INPUT
' MsgLine WHERE IN ZOutTxt$() TO PUT THE EDITED LINE
' ZRightMargin
' ZSnoop
' ZStopInterrupts
' ZWaitExpired
'
' OUTPUTS -- ZOutTxt$(MsgLine) EDITED LINE
'
' PURPOSE -- Subroutine to edit a line quickly using a minimum of
' string space.
'
SUB LineEdit (MsgLine,MaxLen) STATIC
* ------[ first line different ]------
TabToSpace = 0 ' DA060901
LSET ZLineMes$ = ZOutTxt$(MsgLine)
Col = LEN(ZOutTxt$(MsgLine))
ZStopInterrupts = ZTrue
WasXXX = MaxLen - 3
ZWaitExpired = ZFalse
GOTO 3782
* REPLACING old line(s) by new
* ------[ first line different ]------
3730 IF TabToSpace > 0 THEN _ ' DA060901
WasX$ = " " : _ ' DA060901
TabToSpace = TabToSpace - 1 : _ ' DA060901
GOTO 3750 ' DA060901
CALL FindFKey ' DA060901
IF ZSubParm < 0 THEN _
EXIT SUB
WasX$ = ZKeyPressed$
IF WasX$ = "" THEN _
IF ZLocalUser THEN _
GOTO 3730 _
ELSE GOTO 3732
IF WasX$ = ZEscape$ THEN _
ZKeyPressed$ = WasX$ : _
EXIT SUB
SendRemote = ZTrue
WasZ = INSTR(ZLineEditChk$,WasX$)
IF WasZ < 1 THEN _
GOTO 3750 _
ELSE IF WasZ > 4 THEN _
GOTO 3870 _ ' DA060901
ELSE IF WasZ = 1 THEN _ ' DA060901
GOTO 3810 ' DA060901
IF ZLocalUser THEN _
GOTO 3730
* REPLACING old line(s) by new
* ------[ first line different ]------
3740 ON INSTR(ZLineEditChk$,WasX$) GOTO 3810,3730,3730,3730, _ ' DA060901
3870,3870,3870,3870,3870 ' DA060901
* INSERTING new line(s)
3810 TabToSpace = 5 - (Col MOD 5) ' DA060901
GOTO 3730 ' DA060901
* REPLACING old line(s) by new
4777 ZWasCM = 0
CALL CheckTime(TimeChatStarted!,Elapsed!, 2)
ZSecsPerSession! = ZSecsPerSession! + Elapsed!
IF NOT ZLocalUser THEN _
ZAutoLogoff! = TIMER + ZWaitBeforeDisconnect
* ------[ first line different ]------
CALL QuickTPut(" Chat over. BBS resuming",2) ' KG071301
END SUB
* REPLACING old line(s) by new
5507 ' $SUBTITLE: 'Baud450 -- Changes 300 baud to 450'
' $PAGE
' NAME -- Baud450
'
' INPUTS -- PARAMETER MEANING
' ZBPS
'
' OUTPUTS -- ZBPS
'
' PURPOSE -- Allow 300 baud modems to bump up to 450 baud
'
SUB Baud450 STATIC
IF ZBPS <> -1 THEN _
CALL QuickTPut1 ("Sorry, only 300 baud can change speed") : _
EXIT SUB
IF ZFossil THEN _
* ------[ first line different ]------
CALL QuickTPut1 ("Sorry, no 450 baud under FOSSIL") : _ ' KG071301
EXIT SUB
ZOutTxt$ = "Change to 450 baud (Y,[N])"
ZTurboKey = -ZTurboKeyUser
ZSubParm = 1
CALL TGet
IF ZSubParm = -1 OR NOT ZYes THEN _
EXIT SUB
* REPLACING old line(s) by new
10602 ZSubParm = 6
* ------[ first line different ]------
ZWasY$ = ZLastDateTimeOn$ ' KG070601
CALL FileLock
CALL OpenUser (HighestUserRecord)
FIELD 5,31 AS ZUserName$, _
15 AS ZPswd$, _
2 AS ZSecLevel$, _
14 AS ZUserOption$, _
24 AS ZCityState$, _
3 AS MachineType$, _
4 AS ZTodayDl$, _
4 AS ZTodayBytes$, _
4 AS ZDlBytes$, _
4 AS ZULBytes$, _
14 AS ZLastDateTimeOn$, _
3 AS ZListNewDate$, _
2 AS ZUserDnlds$, _
2 AS ZUserUplds$, _
2 AS ZElapsedTime$
* REPLACING old line(s) by new
10604 GET 5,ZUserFileIndex
* ------[ first line different ]------
LSET ZLastDateTimeOn$ = ZWasY$ ' KG070601
IF UpdateDefaults THEN _
CALL DefaultU
IF ZListDir THEN _
LSET ZListNewDate$ = CHR$(VAL(MID$(ZCurDate$,7,2))) + _
CHR$(VAL(MID$(ZCurDate$,1,2))) + _
CHR$(VAL(MID$(ZCurDate$,4,2)))
* REPLACING old line(s) by new
10605 LSET ZUserDnlds$ = MKI$(ZDnlds)
LSET ZUserUplds$ = MKI$(ZUplds)
IF ZEnforceRatios THEN _
LSET ZTodayDl$ = MKS$(ZDLToday!) : _
LSET ZTodayBytes$ = MKS$(ZBytesToday!) : _
LSET ZDlBytes$ = MKS$(ZDLBytes!) : _
LSET ZULBytes$ = MKS$(ZULBytes!)
CALL CheckTime (ZUserLogonTime!, ZSecsUsedSession!, 2)
IF (NOT ZExitToDoors) AND LoggingOff THEN _
TempElapsed! = ZElapsedTime + _
(ZSecsUsedSession! - ZTimeCredits!) / 60 : _
ZTimeCredits! = 0 _
ELSE TempElapsed! = ZElapsedTime
IF TempElapsed! < -32767 THEN _
TempElapsed! = -32767 _
ELSE IF TempElapsed! > 32767 THEN _
TempElapsed! = 32767
LSET ZElapsedTime$ = MKI$(TempElapsed!)
IF ZAdjustedSecurity THEN _
LSET ZSecLevel$ = MKI$(ZUserSecLevel)
PUT 5,ZUserFileIndex
ZSubParm = 8
CALL FileLock
IF ZActiveUserFile$ <> ZOrigUserFile$ AND LoggingOff THEN _
ZActiveUserFile$ = ZOrigUserFile$ : _
ZUserFileIndex = ZOrigUserFileIndex : _
UpdateDefaults = ZFalse : _
* ------[ first line different ]------
LSET ZLastDateTimeOn$ = ZOrigDateTimeOn$ : _ ' KG070601
GOTO 10602
* REPLACING old line(s) by new
10983 ' $SUBTITLE: 'DoorExit -- Setup to exit to a "door"'
' $PAGE
' NAME -- DoorExit
'
' INPUTS -- PARAMETER MEANING
' ZMultiLinkPresent
' ZNodeID$
' ZRBBSBat$
' ZWasZ$
'
' OUTPUTS -- ZWasQ NUMBER OF LINES TO WRITE OUT TO
' ZRCTTYBat$
' ZUserIn$() LINES TO WRITE OUT TO ZRCTTYBat$
'
' PURPOSE -- Set up ZUserIn$() and ZWasQ in order to call "EXITRBBS" and
' exit RBBS-PC to invoke another program
'
* ------[ first line different ]------
SUB DoorExit (ReqDoorsDef) STATIC ' KG032502
IF ZWasZ$ = "" OR _
ZWasZ$ = "NONE" THEN _
EXIT SUB
CALL FindIt (ZWasZ$)
IF NOT ZOK THEN _
GOTO 10986
CALL BreakFileName (ZWasZ$,WasX$,ExitTo$,ExitMethod$,ZFalse) ' KG032501
ExitMethod$ = ""
ZDooredTo$ = ExitTo$
CALL FindIt (ZDoorsDef$)
IF NOT ZOK THEN _
IF ReqDoorsDef THEN _ ' KG032502
EXIT SUB _ ' KG032502
ELSE ExitTo$ = ExitTo$ + " " + ZNodeID$ : _ ' KG032502
GOTO 10989 ' KG032502
* REPLACING old line(s) by new
10985 CALL ReadParms (ZOutTxt$(),8,1)
IF ZErrCode > 0 THEN _
* ------[ first line different ]------
IF ReqDoorsDef THEN _ ' KG032502
EXIT SUB _ ' KG032502
ELSE ExitTo$ = ExitTo$ + " " + ZNodeID$ : _ ' KG032502
GOTO 10989 ' KG032502
IF ExitTo$ <> ZOutTxt$(1) THEN _
GOTO 10985
CALL CheckInt (ZOutTxt$(2))
IF ZErrCode > 0 THEN _
ZErrCode = 0 : _
GOTO 10985
IF ZUserSecLevel < ZTestedIntValue THEN _
CALL QuickTPut1 ("Insufficient security for door") : _
EXIT SUB
WasX$ = LEFT$(ZOutTxt$(5),INSTR(ZOutTxt$(5)+" "," ")-1)
CALL FindIt (WasX$)
IF NOT ZOK THEN _
GOTO 10986
ZFileName$ = ZOutTxt$(3)
ExitMethod$ = ZOutTxt$(4)
ExitTemplate$ = ZOutTxt$(5)
ZDoorDisplay$ = ZOutTxt$(7)
DoorTime$ = ZOutTxt$(8)
CALL AskUsers
CALL SmartText (ExitTemplate$,ZFalse,ZFalse)
CALL MetaGSR (ExitTemplate$,ZFalse)
ExitTo$ = ExitTemplate$
GOTO 10989
* REPLACING old line(s) by new
10989 IF ZTransferFunction = 3 THEN _
ZWasY$ = "Registration" _
ELSE ZWasY$ = ZDooredTo$
ZOutTxt$ = ZWasY$ + _
" door opened at " + _
TIME$ + _
" on " + _
DATE$
ZSubParm = 5
CALL TPut
CALL UpdtCalr (ZDooredTo$ + " door opened!",2)
CLOSE 2
OPEN "O",2,"DORINFO" + _
ZNodeFileID$ + _
".DEF"
PRINT #2,ZRBBSName$
PRINT #2,ZSysopFirstName$
PRINT #2,ZSysopLastName$
IF ZLocalUser THEN _
PRINT #2,"COM0" _
ELSE PRINT #2,ZComPort$
ZUserIn$ = MID$(ZBaudParity$,INSTR(ZBaudParity$," B"))
PRINT #2,ZTalkToModemAt$;ZUserIn$
PRINT #2,ZNetworkType
IF ZGlobalSysop THEN _
PRINT #2,"SYSOP" : _
PRINT #2,"" _
ELSE PRINT #2,ZFirstName$ : _
PRINT #2,ZLastName$
PRINT #2,ZCityState$
PRINT #2,ZWasGR
PRINT #2,ZUserSecLevel
CALL TimeRemain (MinsRemaining)
CALL CheckInt (DoorTime$)
IF ZErrCode = 0 AND ZTestedIntValue > 0 THEN _
IF MinsRemaining > ZTestedIntValue THEN _
MinsRemaining = ZTestedIntValue
PRINT #2,INT(MinsRemaining)
PRINT #2,ZFossil
IF ExitMethod$ = "S" THEN _
* ------[ first line different ]------
CLOSE 4 : _ ' KG052401
CALL ShellExit (ExitTemplate$) : _
ZPrevCaller$ = "" : _ ' KG052401
CALL SetCall : _ ' KG052401
ZExitToDoors = ZTrue : _
CALL BufFile (ZDoorDisplay$,WasX) : _
CALL DoorReturn _
ELSE ZOutTxt$(1) = ZDiskForDos$ + _
"COMMAND /C " + _
ExitTo$ : _
ZOutTxt$(2) = ZRBBSBat$ : _
CALL RBBSExit (ZOutTxt$(),2)
END SUB
* REPLACING old line(s) by new
20100 IF NOT (ZRatioRestrict# > 0 AND TellUser) THEN _
EXIT SUB
IF ZByteMethod <= 1 THEN _
GOTO 20105
IF Today# < 0 THEN _
ZOutTxt$ = "Sorry, Daily download limit of" + _
STR$(ZRatioRestrict#) + " " + _
Method$ + " Reached" : _
ZOK = ZFalse _
* ------[ first line different ]------
ELSE ZOutTxt$ = "Download balance:" + _ ' KG071301
STR$(Today#) + _
" " + _
Method$ : _
ZOK = ZTrue
ZSubParm = 5
CALL TPut
CALL SkipLine(1)
EXIT SUB
'
* REPLACING old line(s) by new
20141 IF ZAnsIndex >= ZLastIndex THEN _
* ------[ first line different ]------
IF LEN(ZDefaultExtension$) > 0 THEN _ ' KG080101
CALL QuickTPut1 ("Default extension is "+ZDefaultExtension$) ' KG080101
ZOutTxt$ = "What compressed file(s)" + ZPressEnterExpert$
CALL PopCmdStack
IF ZSubParm = -1 OR ZWasQ = 0 THEN _
EXIT SUB
* REPLACING old line(s) by new
20143 ZWasZ$ = ZUserIn$(ZAnsIndex)
* ------[ first line different ]------
WasZ$ = ZWasZ$ ' KG022205
CALL AllCaps (ZWasZ$)
CALL BreakFileName (ZWasZ$,Drive$,Prefix$,Ext$,ZFalse)
IF Ext$ = "" THEN _
Ext$ = ZDefaultExtension$ : _
ZWasZ$ = ZWasZ$ + "." + ZDefaultExtension$
ZFileNameHold$ = ZWasZ$
ZFileName$ = ZWasZ$
CALL BadFile (Prefix$,BadFileNameIndex)
ON BadFileNameIndex GOTO 20144,20146,20147
* REPLACING old line(s) by new
* ------[ first line different ]------
20145 CALL RotorsDir (ZFileName$,ZSubDir$(),ZSubDirCount + (NOT ZSysop),ZTrue,"V") ' KG022204
IF ZOK THEN _
GOTO 20148
* REPLACING old line(s) by new
* ------[ first line different ]------
20146 ZWasZ$ = WasZ$ + _ ' KG022205
" not found!"
CALL UpdtCalr (ZWasZ$,2)
ZOutTxt$ = ZWasZ$ + _
" Type correct filename" + ZPressEnterExpert$
ZSubParm = 1
CALL TGet
IF ZSubParm = -1 OR ZWasQ = 0 THEN _
RETURN
ZUserIn$(ZAnsIndex) = ZUserIn$(1)
GOTO 20143